package com.example.mbl.dao;

import com.example.mbl.dto.TeacherDto;
import com.example.mbl.entity.Teacher;
import com.example.mbl.entity.TeacherEducation;
import com.example.mbl.entity.TeacherAward;
import com.example.mbl.result.business.ArticleResult;
import com.example.mbl.result.business.TeacherPageResult;
import com.example.mbl.result.business.TeacherResult;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TeacherMapper {
    int deleteByPrimaryKey(String teacherid);

    int insert(Teacher record);

    int insertSelective(Teacher record);

    Teacher selectByPrimaryKey(String teacherid);

    int updateByPrimaryKeySelective(Teacher record);

    int updateByPrimaryKey(Teacher record);

    List<TeacherPageResult> getTeacherList(@Param("start") int start,
                                           @Param("pagesize") int pagesize);

    TeacherResult getTeacherItem(String teacherid);

    List<ArticleResult> getTeacherArticles(String teacherid);

    List<TeacherEducation> getTeacherEducations(String teacherid);

    List<TeacherAward> getTeacherAwards(String teacherid);

    int setTeacherVisible(String teacherid);

    int addTeacherEducation(TeacherDto teacherDto);

    int addTeacherAward(TeacherDto teacherDto);

    int addTeacherArticle(TeacherDto teacherDto);

    int deleteTeacherEducation(int id);

    int deleteTeacherAward(int id);

    int deleteTeacherArticle(int id);
}